package services;

import Dao.Roles_PerDao;
import entity.PermissionBean;
import entity.Roles_PerBean;

import java.util.List;

public class Roles_PerService {
    private Roles_PerDao roles_perDao = new Roles_PerDao();
    public List<Roles_PerBean> all(){ return roles_perDao.all(); }
    public List<Roles_PerBean> searchByName(String searchName){ return roles_perDao.searchByName(searchName); }

    public int add(int roles_per_RId,int roles_per_PId){ return roles_perDao.addRoles_Per(roles_per_RId,roles_per_PId); }
    public List<PermissionBean> getPmsByRolesId(int rid){ return roles_perDao.getPmsByRolesId(rid); }

    public int del_roles_per(int roles_per_RId){ return roles_perDao.del_roles_per(roles_per_RId);}
}
